Skip to content

fix: stop logging full git config (credential leak) - #758

Merged
EndBug merged 1 commit into
mainfrom
cursor/be53a3a5
Aug 8, 2026
Merged

fix: stop logging full git config (credential leak)#758
EndBug merged 1 commit into
mainfrom
cursor/be53a3a5

Conversation

@EndBug

@EndBug EndBug commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Stop dumping the full merged git.listConfig().all to stdout via core.debug(), which could include actions/checkout's base64 GITHUB_TOKEN in http.*.extraheader.
  • When step debug is enabled, log only an allowlisted identity snapshot (user/author/committer name and email).
  • Add unit tests covering that credential-bearing keys are never included; rebuild lib/.

Test plan

  • npm test (unit tests + lint)
  • npm run build
  • Confirm a normal commit run no longer emits extraheader / AUTHORIZATION basic in stdout without RUNNER_DEBUG
  • With ACTIONS_STEP_DEBUG=true, confirm only identity keys appear in the debug log

Made with Cursor

Avoid dumping listConfig().all via core.debug so checkout extraheader tokens are never written to action logs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@EndBug, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 11 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 407549fe-4b2e-4189-810c-1657e3e202e2

📥 Commits

Reviewing files that changed from the base of the PR and between c38a33b and 966e8f7.

📒 Files selected for processing (4)
  • lib/index.js
  • src/main.ts
  • src/util.ts
  • test/util.test.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@EndBug
EndBug marked this pull request as ready for review August 8, 2026 21:08
@EndBug
EndBug requested a lite review from Copilot August 8, 2026 21:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR prevents accidental credential leakage in GitHub Actions debug logs by removing the debug dump of the full merged git config (which can include http.*.extraheader and token-bearing remote URLs) and replacing it with a narrowly allowlisted “identity-only” snapshot.

Changes:

  • Replace full git.listConfig().all debug logging with allowlisted identity-only logging gated behind step debug.
  • Introduce pickGitIdentityConfig() utility to select only safe identity keys (user/author/committer name/email).
  • Add unit tests ensuring credential-bearing keys are never included; rebuild the bundled lib/ output.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
src/main.ts Stops dumping full git config; logs only allowlisted identity keys when debug is enabled.
src/util.ts Adds pickGitIdentityConfig() and the allowlisted identity key set used for safe logging.
test/util.test.ts Adds unit tests validating only identity keys are retained and credential keys are excluded.
lib/index.js Updates compiled/bundled output to reflect the new safe debug logging behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@EndBug
EndBug merged commit 0971289 into main Aug 8, 2026
12 checks passed
@EndBug
EndBug deleted the cursor/be53a3a5 branch August 8, 2026 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants